package com.woniu.stu.controller;

import com.github.pagehelper.PageInfo;
import com.woniu.entity.TStudent;
import com.woniu.stu.service.Stu2Service;
import com.woniu.stu.vo.TStudentVo;
import com.woniu.util.ResultVo;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * @author kund
 * @date 2021/9/16 - 21:22
 */
@RestController
@CrossOrigin
public class Stu2Controller {

    @Resource
    private Stu2Service stu2Service;

    @RequestMapping("/stu2/findAll")
    public ResultVo<TStudent> findAll(TStudentVo tStudentVo){
        PageInfo<TStudent> pageInfo = stu2Service.findAll(tStudentVo);
        return ResultVo.success("查询学生成功",pageInfo);
    }
}
